package edu.ycu.aladdin.collector.api.entity.weibo;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;

import java.util.LinkedList;
import java.util.Queue;

/**
 * @author <a href="mailto:wangruihuano@gmail.com">王瑞环</a>
 * @since 2019-04-07 22:58
 */
@Slf4j
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class WeiBoDataTaskQueue extends BaseWeiBoCrawlerTaskQueue<UserInfo> {

    /**
     * 微博数据开始时间
     */
    private Long startTime;

    /**
     * 数据截至时间
     */
    private Long endTime;

    private Queue<UserInfo> userInfos = new LinkedList<>();

    @Override
    public Queue<UserInfo> getTaskQueue() {
        return this.userInfos;
    }

    @Override
    public UserInfo pollOne() {
        return userInfos.poll();
    }
}
